package simulation;

import java.util.List;



public abstract class WallRepulsion extends Force{
	
	private int myDirection;
	private double myCoefficient;
	public static final String DEFAULT_NAME = "Wall Repulsion";

	
	public static final int RIGHT_DIRECTION = 0;
	public static final int DOWN_DIRECTION =  90;
	public static final int LEFT_DIRECTION = 180;
	public static final int UP_DIRECTION = 270;
	
	
    public static final int[] directions = {DOWN_DIRECTION, 
								  LEFT_DIRECTION, 
								  UP_DIRECTION, 
								  RIGHT_DIRECTION};
	
    
    /*
	 * Constructor
	 */
    public WallRepulsion(double coeff, int ID){
    	super(DEFAULT_NAME);
    	myCoefficient = coeff;
		myDirection = directions[ID - 1];	
    }
    
    public int getDirection(){
    	return myDirection;
    }
    public double getMagnitude(){
    	return myCoefficient;
    }

	@Override
	public abstract void apply(List<Mass> myMasses);

}
